class Student(object):
    count = 0
    def __init__(self,name):
        # 每创建一个实例，类属性count加1
        self.count = self.count + 1
        self.name = name


xiaohong = Student('xiaohong')
xiaodng = Student('xiaodng')
xiaogng = Student('xiaogng')
print(xiaohong.count)
xiaohong.count = 5
print(xiaohong.count)
print(Student.count)